<template>
    <view @touchmove.stop.prevent="__e" class="mask data-v-6d15ae24" :data-event-opts="[['touchmove', [['', ['$event']]]]]">
        <view
            @tap.stop.prevent="__e"
            class="mask-content animated bounceInDown data-v-6d15ae24"
            :data-event-opts="[['tap', [['', ['$event']]]]]"
            :style="'background-image: url(+bg+); background-size: 100% auto; background-repeat: no-repeat;'"
        >
            <text @tap.stop.prevent="__e" class="new-iconfont icon-close close-btn data-v-6d15ae24" :data-event-opts="[['tap', [['cancel', ['$event']]]]]"></text>
            <scroll-view class="coupon-list data-v-6d15ae24" :scrollY="true">
                <coupon-item @__l="__l" class="data-v-6d15ae24" :coupon="item" :vueId="'4f702098-1-' + index" v-for="(item, index) in list" :key="index"></coupon-item>
            </scroll-view>
            <view @tap="__e" class="confirm-btn data-v-6d15ae24" :data-event-opts="[['tap', [['pickAllCoupon', ['$event']]]]]"></view>
        </view>
    </view>
</template>

<script>
import couponItem from '@/components/CouponPopup/CouponItem';
import tabBar from '@/components/TabBar/tabBar';
(global.webpackJsonp = global.webpackJsonp || []).push([
    ['components/CouponPopup/CouponPopup'],
    {
        '03fe': function (n, o, t) {
            'use strict';

            (function (n) {
                Object.defineProperty(o, '__esModule', {
                    value: true
                });
                o.default = void 0;
                var e = {
                    components: {
                        CouponItem: function () {
                            t.e('components/CouponPopup/CouponItem')
                                .then(
                                    function () {
                                        return resolve(t('bf98'));
                                    }.bind(null, t)
                                )
                                .catch(t.oe);
                        }
                    },
                    data: function () {
                        return {
                            info: {},
                            list: []
                        };
                    },
                    props: {},
                    computed: {
                        link: function () {
                            return this.$store.getters.setting.coupon_popup.link;
                        },
                        bg: function () {
                            return this.$store.getters.setting.coupon_popup.bg || 'https://img121.7dun.com/yuanqimali/home/yhqBg.png';
                        }
                    },
                    watch: {},
                    onLoad: function (n) {},
                    created: function () {
                        var that = this;
                        this.$http('/coupon/popup-list').then(function (o) {
                            that.list = o.data.list;
                        });
                    },
                    methods: {
                        cancel: function () {
                            this.$emit('close');
                        },
                        pickAllCoupon: function () {
                            var that = this;
                            n.showLoading({
                                title: '领取中~',
                                icon: 'none'
                            });
                            this.$http('/coupon/pick-popup', 'POST').then(function (t) {
                                n.showToast({
                                    title: '领取成功~',
                                    icon: 'none'
                                });
                                n.setStorageSync('coupon_popup', 1);
                                n.hideLoading();
                                that.$emit('pickSuccess');
                                setTimeout(function () {
                                    that.toLink(that.link);
                                }, 1300);
                            });
                        }
                    },
                    onPageScroll: function (n) {}
                };
                o.default = e;
            }.call(this, t('543d').default));
        },
        '24c5': function (n, o, t) {
            'use strict';

            t.r(o);
            var e = t('03fe');
            var u = t.n(e);
            for (var c in e) {
                if (['default'].indexOf(c) < 0) {
                    (function (n) {
                        t.d(o, n, function () {
                            return e[n];
                        });
                    })(c);
                }
            }
            o.default = u.a;
        },
        2549: function (n, o, t) {
            'use strict';

            t.d(o, 'b', function () {
                return e;
            });
            t.d(o, 'c', function () {
                return u;
            });
            t.d(o, 'a', function () {});
            var e = function () {
                this.$createElement;
                this._self._c;
            };
            var u = [];
        },
        '5c64': function (n, o, t) {
            'use strict';

            t.r(o);
            var e = t('2549');
            var u = t('24c5');
            for (var c in u) {
                if (['default'].indexOf(c) < 0) {
                    (function (n) {
                        t.d(o, n, function () {
                            return u[n];
                        });
                    })(c);
                }
            }
            t('81dd');
            var p = t('f0c5');
            var i = Object(p.a)(u.default, e.b, e.c, false, null, '6d15ae24', null, false, e.a, void 0);
            o.default = i.exports;
        },
        '81dd': function (n, o, t) {
            'use strict';

            var e = t('fb6a');
            t.n(e).a;
        },
        fb6a: function (n, o, t) {}
    }
]);
(global.webpackJsonp = global.webpackJsonp || []).push([
    'components/CouponPopup/CouponPopup-create-component',
    {
        'components/CouponPopup/CouponPopup-create-component': function (n, o, t) {
            t('543d').createComponent(t('5c64'));
        }
    },
    [['components/CouponPopup/CouponPopup-create-component']]
]);
</script>
<style>
@import './CouponPopup.css';
</style>
